import axios from '~/axios'

//添加新闻
export function addNewsApi(data) {
    return axios.post('/basic/lindi/news/addNews', data)
}

//删除新闻
export function deleteNewsByNewsIdApi(newsId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/news/deleteNewsByNewsId',
        params: {
            NewsId: newsId
        }
    })
}

//修改新闻
export function updateNewsByNewsIdApi(data) {
    return axios.put('/basic/lindi/news/updateNewsByNewsId', data)
}

//获取新闻列表 - 分页
export function getPageNewsListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/news/getPageNewsList',
        params: params
    })
}

//获取新闻详细信息
export function getNewsByNewsIdApi(newsId) {
    return axios.get(`/basic/lindi/news/getNewsByNewsId/${newsId}`)
}